package com.example.kaoshi;

import java.util.Scanner;

/**
 * Created by Quincy on 2018/8/30.
 */
public class Test3 {

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        char[] aChar = str.toCharArray();
        int n = str.length();
        int nums  = 0;

        for (int i = 0; i < n ; i++ ) {
            if (aChar[i] != aChar[i+1]){
                swap(aChar[i], aChar[i+1]);
                nums++;
            }
        }
        System.out.println(nums);


    }
    private  static void swap(char a, char b){
        char temp = a;
        a = b;
        b = temp;
    }
}
